import request from '@/util/request'
import { dealOpts, firm_inventory } from './../api_type'

// 库存管理
const stockGetGoodsStock = (params, opts) => {
  return request.post(dealOpts(firm_inventory + '/getGoodsStock', opts), params)
}

const stockGetSkuStock = (params, opts) => {
  return request.post(dealOpts(firm_inventory + '/getSkuStock', opts), params)
}

const stockGetMatStock = (params, opts) => {
  return request.post(dealOpts(firm_inventory + '/getMatStock', opts), params)
}

const stockGetMatCosts = (params, opts) => {
  return request.post(dealOpts(firm_inventory + '/getMatCosts', opts), params)
}

const stockGetBillHistory = (params, opts) => {
  return request.post(dealOpts(firm_inventory + '/getBillHistory', opts), params)
}

export default {
  stockGetGoodsStock,
  stockGetSkuStock,
  stockGetMatStock,
  stockGetMatCosts,
  stockGetBillHistory
}
